Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate ToUnicodeMap bfrange in multiple ranges (#1498) #1499

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

orzFly
Copy link
Contributor

@orzFly orzFly commented Feb 24, 2024

What kind of change does this PR introduce?
Bug fix of #1498

Checklist:

  • Unit Tests
  • Documentation N/A
  • Update CHANGELOG.md
  • Ready to be merged

@orzFly
Copy link
Contributor Author

orzFly commented Feb 24, 2024

A bfrange line can have only 256 glyphs. Let's split the glyphs into multiple lines.

Note: This may be not correctly at all. According to the spec, we may have at most 100 lines (256*100=25600 glyphs).
image
-- https://adobe-type-tools.github.io/font-tech-notes/pdfs/5014.CIDFont_Spec.pdf

I am not sure if any PDF viewer in real world implements this limit, but hey... that's the spec. I am not a PDF expert - any help is welcome!

@orzFly
Copy link
Contributor Author

orzFly commented Feb 24, 2024

test-fixed.pdf
you may compare this with the bad one in the issue: test-bad.pdf

@blikblum
Copy link
Member

Please add a changelog entry

@orzFly orzFly marked this pull request as ready for review February 26, 2024 10:33
@orzFly
Copy link
Contributor Author

orzFly commented Feb 26, 2024

Please add a changelog entry

I was thinking about how to add the unit test. Both unit test and changelog entry are added now.

@blikblum blikblum merged commit 946f9cf into foliojs:master Feb 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants